home *** CD-ROM | disk | FTP | other *** search
Wrap
# Source Generated with Decompyle++ # File: in.pyc (Python 2.6) import XKit.xorgparser as XKit from jockey.xorg_driver import XorgDriverHandler def _(x): return x class FglrxDriver(XorgDriverHandler): def __init__(self, backend): self._free = False XorgDriverHandler.__init__(self, backend, 'fglrx', 'xorg-driver-fglrx', 'fglrx', 'ati', add_modules = [ 'glx'], disable_modules = [], name = _('ATI/AMD proprietary FGLRX graphics driver'), description = _('3D-accelerated proprietary graphics driver for ATI cards.'), rationale = _('This driver is required to fully utilise the 3D potential of some ATI graphics cards, as well as provide 2D acceleration of newer cards.')) def enable_config_hook(self): if len(self.xorg_conf.globaldict['Screen']) == 0: self.xorg_conf.makeSection('Screen', identifier = 'Default Screen') self.xorg_conf.addOption('Screen', 'DefaultDepth', '24', position = 0, prefix = '') it = 0 for section in self.xorg_conf.globaldict['Files']: try: self.xorg_conf.removeOption('Files', 'RgbPath', position = it) except XKit.xorgparser.OptionException: pass it += 1 module_sections = self.xorg_conf.globaldict['Module'] have_modules = len(module_sections) > 0 if have_modules: for section in module_sections: self.xorg_conf.removeOption('Module', 'Disable', value = 'dri2', position = section) def disable(self): XorgDriverHandler.disable(self) kernel_source = 'fglrx-kernel-source' self.backend.remove_package(kernel_source) return False def enables_composite(self): '''Return whether this driver supports the composite extension.''' if not self.xorg_conf: return False try: if self.xorg_conf.getDriver('Device', 0) in ('fglrx', 'ati', 'radeon', None): return False except (XKit.xorgparser.OptionException, XKit.xorgparser.SectionException): self.xorg_conf error = self.xorg_conf return False return True